<style>
#table_data tr td{
	padding:5px;
	}						
</style>

<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<!-- .breadcrumb -->
	</div>
	<div class="page-content">
        
        <div class="page-header">
        
        	<form action="<?php echo site_url();?>crm/tongji/coupon_data" method="get" id="form_id">
			<div style=" padding:5px;">
            
            
            <span style="padding:0px 10px;">时间: 
            <input type="text" name="start_time" id="start_time" value="<?php  if(!empty($_GET['start_time'])){echo $_GET['start_time'];}?>" style="width:100px; font-size:0.8em; height:25px; line-height:25px">
             到 
             <input style="width:100px; font-size:0.8em; height:25px; line-height:25px" type="text" name="end_time" id="end_time" value="<?php if(!empty($_GET['end_time'])){echo $_GET['end_time'];}?>" />
             <input type="submit" value="搜索" class="btn btn-info btn-sm" />
             
             </span>
          
            
            
            
            
            
           
            
            </div></form>
		</div>
        <div>
        <table id="table_data" class="table table-striped table-bordered table-hover" border="1" style="width:90%; margin:0 auto;">
          <tr>
            <th scope="col">优惠券名称</th>
            <th scope="col">已使用数量</th>
            <th scope="col">已使用金额</th>
            <th scope="col">未使用数量</th>
            <th scope="col">未使用金额</th>
          </tr>
          
          <?php foreach($list as $v):?>
          <tr>
            <td><?php echo $v['coupon_name'];?></td>
            <td><?php echo $v['use_count'];?></td>
            <td><?php echo $v['use_price'];?></td>
            <td><?php echo $v['no_use_count'];?></td>
            <td><?php echo $v['no_use_price'];?></td>
          </tr>
     	  <?php endforeach;?>
          <tr>
            <td>总共：</td>
            <td><?php echo $use_count;?></td>
            <td><?php echo $use_price;?></td>
            <td><?php echo $no_use_count;?></td>
            <td><?php echo $no_use_price;?></td>
          </tr>
          
        </table>

        
        </div>
		<!-- /.row -->
	</div><!-- /.page-content -->
</div><!-- /.main-content -->
<script>

$('#start_time').datetimepicker({
            format: 'yyyy-mm-dd',
			autoclose: true,
			minView: 0,
			language:'zh-CN',
			minView: "month",
        });
		
$('#end_time').datetimepicker({
			format: 'yyyy-mm-dd',
			autoclose: true,
			minView: 0,
			language:'zh-CN',
			minView: "month",
		});

</script>